<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%><%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<tiles:insertDefinition name="layout">
	<tiles:putAttribute name="head">
		<script type="text/javascript">
			$(function() {
				$("form").Validform({
					ajaxPost : true,
					tiptype : ValidUtils.siblingTip,
					callback : function(data) {
						helper.showMsg(data, {
							okHandler : function() {
								location = "../log/viewLogByTime?id=" + data.id;
							}
						});
					}
				});
			});
		</script>
	</tiles:putAttribute>
	<tiles:putAttribute name="mainBody">
		<ul class="breadcrumb">
			<li><s:url action="listStudent" namespace="/student" id="listStudent">
				</s:url> <a href="${listStudent}">学员管理</a> <span class="divider">/</span></li>
			<li><s:url action="viewLogByTime" namespace="/log" id="viewLogByTime">
					<s:param name="id" value="#student.id"></s:param>
				</s:url> <a href="${viewLogByTime}">学员日志</a> <span class="divider">/</span></li>
			<li class="active">修改学员</li>
		</ul>
		<form action="doModifyStudent" method="post" class="form-horizontal">
			<fieldset>
				<legend>修改学员信息</legend>
				<input type="hidden" name="id" value="${student.id}" />
				<div class="row-fluid">
					<div class="span6">
						<div class="control-group">
							<label class="control-label">内部编号</label>
							<div class="controls">
								<input type="text" name="no" value="${student.no}" readonly="readonly" />
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">学号</label>
							<div class="controls">
								<input type="text" name="stuId" value="${student.stuId}" />
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">姓名</label>
							<div class="controls">
								<input type="text" name="name" id="name" value="${student.name}"> <span id="nameCheck"></span>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">性别</label>
							<div class="controls">
								<label class="radio">
									男<input type="radio" name="sex" value="Male" <s:if test='#student.sex.toString() == "男"'>checked="checked"</s:if> />
								</label>
								<label class="radio">
									女<input type="radio" name="sex" value="Female" <s:if test='#student.sex.toString() == "女"'>checked="checked"</s:if> />
								</label>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">职业</label>
							<div class="controls">
								<input type="text" name="job" value="${student.job}" /><span></span>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">年龄</label>
							<div class="controls">
								<select name="age">
									<option value="0">未设置</option>
									<s:iterator begin="1" end="100" var="age">
										<option <s:if test="#student.age == #age">selected="selected"</s:if> value="${age}">${age}</option>
									</s:iterator>
								</select><span id="nameCheck"></span>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">教育程度</label>
							<div class="controls">
								<select name="education">
									<option <s:if test="#student.education == ''">selected="selected"</s:if> value="">未设置</option>
									<option <s:if test="#student.education == '学龄前'">selected="selected"</s:if>>学龄前</option>
									<option <s:if test="#student.education == '小学'">selected="selected"</s:if>>小学</option>
									<optgroup label="中等教育">
										<option <s:if test="#student.education == '初中'">selected="selected"</s:if>>初中</option>
										<option <s:if test="#student.education == '高中'">selected="selected"</s:if>>高中</option>
										<option <s:if test="#student.education == '中职'">selected="selected"</s:if>>中职</option>
										<option <s:if test="#student.education == '职高'">selected="selected"</s:if>>职高</option>
										<option <s:if test="#student.education == '技校'">selected="selected"</s:if>>技校</option>
									</optgroup>
									<optgroup label="高等教育">
										<option <s:if test="#student.education == '专科'">selected="selected"</s:if>>专科</option>
										<option <s:if test="#student.education == '本科'">selected="selected"</s:if>>本科</option>
										<option <s:if test="#student.education == '硕士研究生'">selected="selected"</s:if>>硕士研究生</option>
										<option <s:if test="#student.education == '博士研究生'">selected="selected"</s:if>>博士研究生</option>
									</optgroup>
								</select> <span id="nameCheck"></span>
							</div>
						</div>
					</div>
					<div class="span6">
						<div class="control-group">
							<label class="control-label">移动电话</label>
							<div class="controls">
								<input type="text" name="mobile" value="${student.mobile}" /> <span id="nameCheck"></span>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">固定电话</label>
							<div class="controls">
								<input type="text" name="phone" value="${student.phone}" /> <span id="nameCheck"></span>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">电子邮箱</label>
							<div class="controls">
								<input type="text" name="email" value="${student.email}" /> <span id="nameCheck"></span>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">邮政编码</label>
							<div class="controls">
								<input type="text" name="zip" value="${student.zip}" /> <span id="nameCheck"></span>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">详细地址</label>
							<div class="controls">
								<textarea name="address">${student.address}</textarea>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label">备注</label>
							<div class="controls">
								<textarea name="title">${student.title}</textarea>
							</div>
						</div>
					</div>
				</div>
			</fieldset>
			<div class="control-group">
				<div class="controls">
					<button type="submit" class="btn btn-primary btn-ok">
						<i class="ico-ok ico-white"></i>保存
					</button>
					<button type="reset" class="btn btn-cancel">
						<i class="ico-repeat"></i>重置
					</button>
				</div>
			</div>
		</form>
	</tiles:putAttribute>
</tiles:insertDefinition>